<div id="sidebar-right">
<?php $tn_zen_featured_vid1 = get_option('tn_zen_featured_vid1'); $tn_zen_featured_vid2 = get_option('tn_zen_featured_vid2'); ?>

<?php if(($tn_zen_featured_vid1 == '') && ($tn_zen_featured_vid2 == '')){ ?>

<?php

} 

else {
	?>


<div id="ads-slot">
		<div style="height: 380px;">
			<h2 class="line">recommend</h2>
			<span class="liner"></span>
			<ul class="block">
<?php
	
	$args = array (
			'posts_per_page'=>'3' 
	);
	query_posts ( $args );
	?>
            
             <?php if (have_posts()) : ?>
        <?php
		
$count = 0;
		while ( have_posts () ) :
			the_post ();
			?>
	
		<?php
			
$values = get_post_custom_values ( "featured-images-s" );?>
			
		<li>
					<table>
						<tr>
							<td>
							<?php if (is_array ( $values )) :?>
							<a href='<?php the_permalink() ?>'
								title='<?php the_title(); ?>'> <img alt='<?php the_title(); ?>'
									src='<?php echo"$values[0]";?>' width="75px" height="75px" /></a>
			<?php else:?>
								<a href='<?php the_permalink() ?>'
								title='<?php the_title(); ?>'> <img alt='<?php the_title(); ?>'
									src="<?php bloginfo('template_directory'); ?>/images/no_img_s.png" width="75px" height="75px" /></a>
			
					<?php endif;?>
		</td>

							<td>
								<p>
									<span><a href="<?php the_permalink() ?>"
										title="<?php the_title(); ?>"><?php the_title(); ?> </a></span>
								</p> <span><?php the_ratings(); ?></span>

							</td>
						</tr>
					
					</table>
					
				</li>
				
		<?php endwhile; ?>
        <?php endif;   wp_reset_query();?>
	</ul>
		</div>
		<h2 class="line">Sponsors.</h2>
		<span class="liner"></span>
		<!--[if IE]>
	<br/>
<![endif]-->
		<a href="#"><img
			src="<?php bloginfo('template_directory'); ?>/images/banner/sample.jpg"
			alt="sample" /></a> <a href="#"><img
			src="<?php bloginfo('template_directory'); ?>/images/banner/sample.jpg"
			alt="sample" /></a> <a href="#"><img
			src="<?php bloginfo('template_directory'); ?>/images/banner/sample.jpg"
			alt="sample" /></a> <a href="#"><img
			src="<?php bloginfo('template_directory'); ?>/images/banner/sample.jpg"
			alt="sample" /></a> <a href="#"><img
			src="<?php bloginfo('template_directory'); ?>/images/banner/sample.jpg"
			alt="sample" /></a> <a href="#"><img
			src="<?php bloginfo('template_directory'); ?>/images/banner/sample.jpg"
			alt="sample" /></a>

		<p class="adshere">
			<a href="#putyourcontactemail">ลงโฆษณา</a>
		</p>
	</div>


	<div id="video-slot">
		<h2 class="line">Videos.</h2>
		<span class="liner"></span>
		<!--[if IE]>
	<br/>
<![endif]-->
		<p><?php $tn_zen_featured_vid1 = stripcslashes($tn_zen_featured_vid1); echo $tn_zen_featured_vid1; ?> </p>
		<p><?php $tn_zen_featured_vid2 = stripcslashes($tn_zen_featured_vid2); echo $tn_zen_featured_vid2; ?> </p>
	</div>

<?php } ?>






<?php

if (! function_exists ( 'dynamic_sidebar' ) || ! dynamic_sidebar ( 2 )) :
	?>


<?php if(function_exists("akpc_most_popular")) : ?>
<h2 class="line"><?php _e('Most Popular'); ?></h2>
	<span class="liner"></span>
	<ul class="list">
		<!--[if IE]>
	<br/>
<![endif]-->
<?php akpc_most_popular(); ?>
</ul>
<?php endif; ?>


<h2 class="line"><?php _e('Popular Tags'); ?>.</h2>
	<span class="liner"></span>
	<!--[if IE]>
	<br/>
<![endif]-->
	<ul class="nolist">
		<li>
<?php if(function_exists("UTW_ShowTagsForCurrentPost")){  ?>
<?php UTW_ShowWeightedTagSetAlphabetical("sizedtagcloud","","70"); ?>
<?php } elseif(function_exists("wp_tag_cloud")) { ?>
<?php wp_tag_cloud('smallest=10&largest=20&'); ?>
<?php } else { ?>
you have to install Ultimate Tag Warrior if using later version of wordpress
<?php } ?>
</li>
	</ul>



<?php endif; ?>


</div>

</div>